﻿using AppsModel.Models;
using MVC_basic.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppsModel.APIModel
{
    public class APIApp
    {
        public int id { get; set; }
        public string name { get; set; }
        public string logoUrl { get; set; }
        public string siteUrl { get; set; }

        public APIApp(int id, string name, string logoUrl, string siteUrl)
        {
            this.id = id;
            this.name = name;
            this.logoUrl = logoUrl;
            this.siteUrl = siteUrl;
        }
        public static APIApp AppToAPI(CanvasApp app)
        {
            APIApp apiapp = new APIApp(app.id, app.name, app.logoUrl, app.url);
            return apiapp;
        }
    }
}
